import QtQuick 2.0
import QtQuick.Controls 2.3
import QtQuick.Layouts 1.3



Page{
    id:root
    title: "Button"


    StackView{
        id:stackV
        anchors.fill: parent
        initialItem: "Charts/Effct.qml"
    }

    function replaceView(source){
        stackV.replace(stackV.currentItem,source)
    }

    Action {
        id: _custom
        text: qsTr("区域折线图")
        icon.source: "qrc:/image/icons/error.svg"
        onTriggered: replaceView("Charts/Custom.qml")
    }

    Action {
        id: _System
        text: qsTr("柱状图")
        icon.source: "qrc:/image/icons/error.svg"
        onTriggered: replaceView("Charts/System.qml")
    }
    Action {
        id: _Effct
        text: qsTr("Effct")
        icon.source: "qrc:/image/icons/error.svg"
        onTriggered: replaceView("Charts/Effct.qml")
    }
    Action {
        id: _line
        text: qsTr("折线图")
        icon.source: "qrc:/image/icons/error.svg"
        onTriggered: replaceView("Charts/LineSerial.qml")
    }
    Action {
        id: _scatte
        text: qsTr("散点图")
        icon.source: "qrc:/image/icons/error.svg"
        onTriggered: replaceView("Charts/ScatterSerial.qml")
    }
    Action {
        id: _horizon
        text: qsTr("水平条")
        icon.source: "qrc:/image/icons/error.svg"
        onTriggered: replaceView("Charts/HorizonSerial.qml")
    }
    Action {
        id: _spline
        text: qsTr("曲线图")
        icon.source: "qrc:/image/icons/error.svg"
        onTriggered: replaceView("Charts/SplineSerial.qml")
    }


    footer:ToolBar {
        Row {
            anchors.fill: parent
            spacing: 10
            ToolButton { action: _Effct }
            ToolButton { action: _System }
            ToolButton { action: _custom }
            ToolButton { action: _line }
            ToolButton { action: _scatte }
            ToolButton { action: _horizon }
            ToolButton { action: _spline }
        }
    }

}
